package org.ihelpuoo.weboo.tag.ajax;

import javax.servlet.jsp.JspException;

import org.ihelpuoo.lang.StringUtils;

public abstract class OverrideTag extends SettingTag
{

	private static final long	serialVersionUID	= 471485209334104316L;

	private String				params;

	public abstract String getName();

	public String getParams()
	{
		return params;
	}

	public void setParams(String params)
	{
		this.params = params;
	}

	public String getBody()
	{
		return this.getBodyString();
	}

	@Override
	protected void end() throws JspException
	{
		((ViewTag)this.getParent()).addOverride(this);
	}

	@Override
	protected boolean isAvailable()
	{
		return !StringUtils.isBlank(getName()) && !this.isBlankBody();
	}

}
